package com.base.mybaseproject.demo;

import android.app.Activity;
import android.os.Bundle;
import android.widget.ListView;

import com.base.mybaseproject.pulltorefresh.PullToRefreshBase;
import com.base.mybaseproject.pulltorefresh.PullToRefreshBase.OnLastItemVisibleListener;
import com.base.mybaseproject.pulltorefresh.PullToRefreshBase.OnRefreshListener;
import com.base.mybaseproject.pulltorefresh.PullToRefreshListView;
import com.example.mybaseproject.R;

public class PullToRefreshActivity extends Activity implements OnLastItemVisibleListener, OnRefreshListener {

	private PullToRefreshListView ptrLV;
	private ListView lv;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.demo_ptr_main_activity);
		ptrLV = (PullToRefreshListView) findViewById(R.id.demo_ptr_lv);
		lv = ptrLV.getRefreshableView();

		ptrLV.setOnLastItemVisibleListener(this);
		ptrLV.setOnRefreshListener(this);
	}

	/** 加载更多 */
	@Override
	public void onLastItemVisible() {
		// TODO Auto-generated method stub

	}

	/** 下拉刷新 */
	@Override
	public void onRefresh(PullToRefreshBase refreshView) {
		// TODO Auto-generated method stub

	}

}
